package com.jrx.anytxn.param.service.rights;

import com.jrx.anytxn.common.exception.TxnBizException;
import com.jrx.anytxn.common.exception.TxnException;
import com.jrx.anytxn.i18n.response.TxnPage;
import com.jrx.anytxn.param.dto.rights.PrRightsQualificationReq;
import com.jrx.anytxn.param.dto.rights.PrRightsQualificationRes;
import com.jrx.anytxn.param.entity.PrRightsQualification;

import java.util.List;

/**
 * ClassName IPrRightsQualificationService
 *
 * @author lujianyou
 * @version 1.0
 * @description 权益资格类接口
 * @date 2021/6/11 11:31
 **/
public interface IPrRightsQualificationService {

    /**
     * 根据 租户号、权益资格id 获取权益资格参数表
     * @param tenantId
     * @param qualificationId
     * @return
     */
    PrRightsQualification getByTenantIdAndQualificationId(String tenantId,String qualificationId);

    /**
     * 根据 租户号、权益资格id 获取权益资格参数表
     * @param tenantId
     * @param qualificationId
     * @return
     */
    PrRightsQualificationRes getResByTenantIdAndQualificationId(String tenantId,String qualificationId) throws TxnBizException;

    /**
     * 根据机构号查询所有权益资格信息
     * @param tenantId
     * @return
     */
    List<PrRightsQualification> listByTenantId(String tenantId);

    /**
     * 根据 租户号、权益资格id 获取权益资格详情
     * @param tenantId
     * @param qualificationId
     * @return
     */
    PrRightsQualificationRes getDetailByTenantIdAndQuaId(String tenantId,String qualificationId);

    /**
     * 校验 权益资格参数对象
     * @param tenantId
     * @param qualificationId
     * @param productCode
     * @return
     */
    List<PrRightsQualificationRes> checkQualification(String tenantId,String qualificationId, String productCode) throws TxnBizException;

    /**
     * 添加 权益资格参数对象
     * @param prRightsQualificationReq
     * @return
     */
    Integer addPrRightsQualification(PrRightsQualificationReq prRightsQualificationReq) throws TxnBizException;

    /**
     * 根据 租户id 查询权益资格参数列表
     * @param pageNum
     * @param pageSize
     * @param tenantId
     * @return
     */
    TxnPage<PrRightsQualificationRes> findAllPageByTenantId(Integer pageNum, Integer pageSize, String tenantId) throws TxnException;

    /**
     * 根据 租户id 修改权益资格参数列表
     * @param prRightsQualificationReq
     */
    Integer modifyPrRightsQualification(PrRightsQualificationReq prRightsQualificationReq) throws TxnBizException;

    /**
     * 根据 租户id,权益资格id 修改权益资格参数列表
     * @param tenantId
     * @param qualificationId
     */
    Boolean removeByTenIdAndQualificationId(String tenantId, String qualificationId)throws TxnBizException;

    /**
     * 根据 租户id  查询下拉权益资格参数列表
     * @param tenantId
     */
    List<PrRightsQualificationRes> findAllByTenId(String tenantId);

}
